<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css" />
  </head>

  <body>
    <div id="app">
      <p>
        {{count}}
        <!-- <button @click="()=>{count++}">+</button> -->
        <!-- <button @click="count++">+</button> -->

        <!-- <button @click="()=>{add()}">+</button> -->
        <button @click="add()">+</button>

        <button @click="div()">-</button>
        <button @click="div">-</button>
      </p>
    </div>
    <script type="module">
      import { createApp, ref, reactive, computed } from "./vue.esm-browser.js";
      const app = createApp({
        setup() {
          const count = ref(0);
          function add() {
            count.value++;
          }
          function div() {
            count.value--;
          }
          return { count, add, div };
        },
      });

      app.mount("#app"); //挂载
    </script>
  </body>
</html>
